package com.card.game.pdk;
//牌信息
public class PdkInfo {
	public String userId;//玩家id
	public PdkHand lastOutHand;//最后一手出牌的牌
	private int bombNum;//已经出的炸弹数
	public int handSize;//我的手牌数
	private transient int outSize;
	public transient int allBombNum;
	public transient int maxScore;
	public transient int winNum;
	
	public PdkInfo(String userId) {
		this.userId = userId;
	}
	public PdkHand getLastOutHand() {
		return lastOutHand;
	}
	public void setLastOutHand(PdkHand lastOutHand) {
		if(!lastOutHand.isPass()) {
			this.outSize ++;
		}
		this.lastOutHand = lastOutHand;
	}
	
	public void addBomb() {
		this.bombNum ++;
		this.allBombNum ++;
	}
	public int getBombNum() {
		return bombNum;
	}
	public int getOutSize() {
		return outSize;
	}
	public void clear() {
		this.lastOutHand = null;
		this.bombNum = 0;
		this.outSize = 0;
	}
	
	public void calGame(int score) {
		this.maxScore = Math.max(score, this.maxScore);
		if(score > 0) {
			this.winNum ++;
		}
	}
}
